package example5;

public class Test {
    public static void main(String[] args){
       View button1 = new Button("button1"){
            @Override
            public void click() {
                System.out.println("ButtonA");
            }
        };
       button1.click();
        View button2 = new Button("button2"){
            @Override
            public void click() {
                System.out.println("ButtonB");
            }
        };
        button2.click();
    }
}
